//
//  MJChiBaoZiHeader.m
//  MJRefreshExample
//
//  Created by MJ Lee on 15/6/12.
//  Copyright © 2015年 小码哥. All rights reserved.
//

#import "MJChiBaoZiHeader.h"

@implementation MJChiBaoZiHeader
#pragma mark - 重写方法
#pragma mark 基本设置
- (void)prepare
{
    [super prepare];
    
   
        // 设置普通状态的动画图片
        NSMutableArray *idleImages = [NSMutableArray array];
        for (NSUInteger i = 50; i<=119; i++) {
            UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"headrefresh%03ld", i]];
            [idleImages addObject:image];
        }
        [self setImages:idleImages forState:MJRefreshStateIdle];
        
        // 设置即将刷新状态的动画图片（一松开就会刷新的状态）
        NSMutableArray *refreshingImages = [NSMutableArray array];
        for (NSUInteger i = 0; i<=49; i++) {
            UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"headpull%02ld", i]];
            [refreshingImages addObject:image];
        }
        
        [self setImages:refreshingImages forState:MJRefreshStatePulling];
        
        [self setImages:idleImages forState:MJRefreshStateRefreshing];

    
}
@end
